using SmartSoft.DAL;
using System.Web.Services;
using System;
using System.Data;
using System.Data.SqlClient;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.None)]
public class WSCDVTDataAccess : System.Web.Services.WebService
{
    private CDVTDataAccess objDataAccess = new CDVTDataAccess();
    public WSCDVTDataAccess()
    {
    }


    [WebMethod]
    public bool Delete(object po_KeyCode)
    {
        object[] arr = Validator.Validate(po_KeyCode);
        return objDataAccess.Delete(arr[0]);
    }

    [WebMethod(MessageName = "OneParams", Description = "", EnableSession = true)]
    public DataTable GetDataTable(string ps_Subsidiary)
    {

        return objDataAccess.GetDataTable(ps_Subsidiary);
    }

    [WebMethod(MessageName = "TwoParams", Description = "", EnableSession = true)]
    public DataTable GetDataTable(string ps_Subsidiary, object ps_Code)
    {
        object[] arr = Validator.Validate(ps_Code);
        return objDataAccess.GetDataTable(ps_Subsidiary, arr[0]);
    }

    [WebMethod]
    public int Save(bool pb_NewChecked, DataTable tableRow)
    {

        return objDataAccess.Save(pb_NewChecked, tableRow.Rows[0]);
    }
}